
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<title>
			新外卖红包		</title>
		<script>
			window.addEventListener('load',
			function() {
				// rem fallback--vw不生效的时候
				var windowWidth = window.innerWidth;
				if (window.getComputedStyle(document.documentElement).fontSize === '50px' && windowWidth !== 375) {
					var ww = Math.min(640, Math.max(320, windowWidth));
					document.documentElement.style.fontSize = 100 * ww / 750 + 'px'
				}
			})
		</script>
        <!--<link href="/css/ele.css" rel="stylesheet">-->
		<style>
		    [v-cloak]{
			    display:none;
			}
			.el-message-box{
			    max-width:90%;
			}
			body,html{margin:0;padding:0}.safe-pb{padding-bottom:env(safe-area-inset-bottom)}@-webkit-keyframes pulse{0%{transform:scaleX(1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scaleX(1)}}@keyframes pulse{0%{transform:scaleX(1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scaleX(1)}}
		</style>
	</head>
	<body>
		<div id="app" v-cloak>
			<div style="background: linear-gradient(rgb(251, 158, 0) 0%, rgb(251, 158, 0) 37%, rgb(255, 161, 0) 39%, rgb(255, 192, 83) 100%) rgb(255, 161, 0); min-height: 100vh; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;">
			    <div style="background: url(./b042a8ca829729ce27ab7bdef6920cff.png) center top / 100% no-repeat; position: relative; height: 173.333vw; width: 100vw;">
			        <div style="background: url(./590f5730286c47aa76b6150fcde481b7.png) center top / 100% no-repeat; position: relative; height: 40.8vw; width: 100vw;"></div>
			        <div style="height: 45.3333vw;"></div>
			        <div style="height: 13.3333vw; background: url(https://p0.meituan.net/travelcube/a0dafefce12db73b605d437c649b6a5a6070.png) 0% 0% / cover; width: 40vw; font-weight: bold; font-size: 5.2vw; color: rgb(186, 0, 0); text-align: center; margin: 0px auto; line-height: 11.7333vw; animation: 1.2s ease 0s infinite normal none running pulse;" @click="open_url(mini_url)">去领取</div>
		        </div>
		        <div class="safe-pb"></div>
	        </div>

	        <div v-if="flag" style="background: url(./8e9d0257268f2bf4bef9a5c9385d6401.png) center top / 100vw no-repeat, linear-gradient(rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%); width: 100%; height: 100%; position: fixed; z-index: 10; top: 0vw; left: 0vw;"></div>
		</div>
		
		<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
        <script src="/js/jquery.js"></script>
        <script src="/js/vue.js"></script>
        <!--<script src="/js/ele.js"></script>-->
        <script>
            var app = new Vue({
                el:"#app",
                data:{
                    js_init: false,
                    loading: true,
                    is_wx: false,
                    setp:1,
                    sign: "",
                    mini_url: "imeituan://www.meituan.com/takeout/browser?inner_url=https%3A%2F%2Fclick.meituan.com%2Ft%3Ft%3D1%26c%3D2%26p%3DA6qIf75zYXxq%26f_openId%3D0%26noshare%3D1%26f_userId%3D0",
                    flag: false,
                    sn: "ADxeoA",
                    ios: false,
                },
                mounted(){
                    this.init();
                    var ua = navigator.userAgent.toLowerCase();
                    if(ua.indexOf("ios") > -1 || ua.indexOf("mac") > -1 || ua.indexOf("iphone") > -1 || ua.indexOf("ipad") > -1){
                        this.ios = true
                    }
                },
                methods:{
                    init(){
                        var that = this;
                        this.check_wx();
                        if(!this.is_wx){
                            if(!this.ios){
                                // window.open(this.mini_url)
                            }
                            setTimeout(function(){
                                window.location.href = that.mini_url;
                            }, 500)
                            this.copy_count()
                        }
                    },
                    
                    copy_count(){
                        var that = this;
                        $.ajax({
        		            type:"GET",
        		            url:"/api_v3/single_page.php",
        		            data:{
        		                type:"copy_count",
        		                sn: that.sn,
        		            },
        		            success(data){
        		              //  window.location = url;
        		            }
        		        });
                    },
                    
                    open_url(url){
                        // if(url.indexOf("http") == -1){
                        //     url = "http://" + url;
                        // }
                        if(this.is_wx){
                            // alert("请点击右上角选择在浏览器中打开");
                            this.flag = true;
                        } else {
                            if(!this.ios){
                                // window.open(url)
                            }
                            setTimeout(function(){
                                window.location.href = url
                            }, 500)
                            this.copy_count()
                        }
                    },
                    
                    check_wx(){
                        var ua = navigator.userAgent.toLowerCase()
                        if(ua.indexOf("micromessenger") > -1){
                            this.is_wx = true;
                        }
                    },
                }
            })
            
        </script>
	</body>

</html>
